*----------------------------------------------------------------
*Title:  Chapter5.do
*Date:  September 26, 2000
*Project:  Book Manuscript
*Data:  diss012699.dta
*Description:  This batch file is written to include analysis 
*described in Chapter 5 of my book.
*
*----------------------------------------------------------------
use bookdata1

*This is the batch file to estimate the models in chapter 2 and chapter 5.  In these specifications I exclude vetoes.
generate appdivma=approv*divided*majorh
generate count10=com+ind+term+mem
generate appmajh=approv*majorh
generate appdivlow=approv*divided*lowmaj

*Now I will do the analysis for the main text.
oprobit locat1 divided approv app_div majorh mjh_div line trend exec sec reorg external, cluster(year)
probit com divided approv app_div majorh mjh_div line trend exec sec reorg external, cluster(year)
probit ind divided approv app_div majorh mjh_div line trend exec sec reorg external, cluster(year)

more
probit term divided approv app_div majorh mjh_div line trend pmade external, cluster(year)
probit mem divided approv app_div majorh mjh_div line trend exec sec reorg external, cluster(year)

predict pmem
summarize approv majorh trend if pmem~=.
more
*Now I will generate the 3 way interaction.

oprobit locat1 divided approv app_div appmajh majorh mjh_div appdivma line trend exec sec reorg external, cluster(year)
probit com divided approv app_div appmajh  majorh mjh_div appdivma line trend exec sec reorg external, cluster(year)
probit ind divided approv app_div appmajh majorh mjh_div appdivma line trend exec sec reorg external, cluster(year)
more
probit term divided approv app_div appmajh majorh mjh_div appdivma line trend pmade external, cluster(year)
probit mem divided approv app_div appmajh majorh mjh_div appdivma line trend exec sec reorg external, cluster(year)

predict pmem2
summarize approv majorh trend if pmem2~=.
more



*Now with budget data.

generate bud92=ln(budget/gdpdefla)

oprobit locat1 divided approv app_div majorh mjh_div bud92 trend exec sec reorg external, cluster(year)
probit com divided approv app_div majorh mjh_div bud92 trend exec sec reorg external, cluster(year)
probit ind divided approv app_div majorh mjh_div bud92 trend exec sec reorg external, cluster(year)

more
probit term divided approv app_div majorh mjh_div bud92 trend pmade external, cluster(year)
probit mem divided approv app_div majorh mjh_div bud92 trend exec sec reorg external, cluster(year)

*Now with legislatively created only
drop if leg==0
oprobit locat1 divided approv app_div majorh mjh_div line trend external, cluster(year)
probit com divided approv app_div majorh mjh_div line trend external, cluster(year)
probit ind divided approv app_div majorh mjh_div line trend external, cluster(year)

more
probit term divided approv app_div majorh mjh_div line trend external, cluster(year)
probit mem divided approv app_div majorh mjh_div line trend external, cluster(year)


